import React from 'react'
import { Button } from 'antd'
import { useNavigate } from 'react-router-dom'

const Login = () => {
  const navigate = useNavigate()
  const handleLogin = () => {
    localStorage.setItem('token', 'yes')
    navigate('/home', { replace: true })
  }
  return (
    <div>
      <div>Login</div>
      <Button onClick={handleLogin}>点我进行登录</Button>
    </div>
  )
}

export default Login
